<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>分页查询结果</title>
    <script src="../js/jquery-2.0.0.min.js"></script>
</head>
<body>
    <table id="tab1">
        <tr>
            <th>序号</th>
            <th>编号</th>
            <th>登录名</th>
            <th>性别</th>
            <th>年龄</th>
        </tr>
        <tbody></tbody>
    </table>
</body>
<script language="JavaScript">
    $(function () {
        getData();
    })
    function getData() {
        $.ajax({
            url: "../user/queryPage",
            type: "post",
            dataType: "json",
            success: function (json) {
                for(var i = 0;i < json.data.length;i++){
                    tr += "<tr>" +
                            "<td><input type='checkbox' /></td>" +
                            "<td>" + (i + 1) + "</td>" +
                            "<td>" + json.data[i].id + "</td>" +
                            "<td>" + json.data[i].loginname + "</td>" +
                            "<td>" + json.data[i].sex + "</td>" +
                            "<td>" + json.data[i].age + "</td></tr>";
                }
                $("#tab1").append(tr);
            }
        });
    }
</script>
</html>